<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sb" uri="/struts-bootstrap-tags"%>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
<%@taglib prefix="display" uri="http://displaytag.sf.net"%>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
<%@ page import="java.util.Calendar"%>
<%@ page import="java.util.*,java.text.*;"%>
<jsp:include page="/loginCheck.jsp" />
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="StyleSheet" href="css/jquery.qtip.min.css" type="text/css">
<link rel="StyleSheet" href="css/bootstrap.min.css" type="text/css">
<link rel="StyleSheet" href="css/messi.min.css" type="text/css">
<link rel="StyleSheet" href="css/style.css" type="text/css">
<script type="text/javascript" src="js/jquery-2.1.0.min.js"></script>
<script type="text/javascript" src="js/jquery.qtip.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/messi.js"></script>
<script type="text/javascript" src="js/util.js"></script>
<script type="text/javascript" src="js/checkform.js"></script>
<script type="text/javascript" src="js/script.js"></script>
<title>履歴一覧</title>
<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
<!--[if lt IE 9]>
    <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
<sb:head />
</head>
<body>
	<div class="wrapper">
		<tiles:insertTemplate template="/template/header.jsp"></tiles:insertTemplate>
		<div class="panel panel-success">
			<div class="panel-heading">
				<img src="img/history_icon.png" style="width: 32px; height: 32px;"><strong>履歴一覧検索</strong><img
					alt="" src="img/help.png" class="help-icon">
			</div>
			<div class="panel-body">
				<s:actionerror theme="bootstrap" />
				<s:actionmessage theme="bootstrap" />
				<s:fielderror theme="bootstrap" />
				<div class="container box-search">
					<div class="row">
						<div class="col-xs-12 col-md-8">
							<label for="exampleInputEmail2"><strong>年月選択あるいは品名コードの一部を入力してください</strong></label>
						</div>
					</div>
					<div class="row">
						<form action="searchDpln.action" method="post" role="form"
							enctype="multipart/form-data"
							onsubmit="return validateSearch(this);">
							<div class="col-xs-6 col-md-4">
								<%!DateFormat tipe = new SimpleDateFormat("");
	Calendar cal = Calendar.getInstance();%>
								<div class="col-sm-6 select-f" style="padding-left: 0px;">
									<div class="input-group">
										<select class="form-control select-year" name="sup_year">
											<option value="0" selected="selected">ALL</option>
											<option value=<%out.print(cal.get(Calendar.YEAR));%>>
												<%
													out.print(cal.get(Calendar.YEAR));
												%>
											</option>
											<option value=<%out.print(cal.get(Calendar.YEAR) - 1);%>>
												<%
													out.print(cal.get(Calendar.YEAR) - 1);
												%>
											</option>
										</select> <span class="input-group-addon">年</span>
									</div>
								</div>
								<div class="col-sm-6">
									<div class="input-group">

										<select class="form-control select-month" name="sup_month">
											<option value="0" selected="selected">ALL</option>
											<%
												for (int i = 1; i < 13; i++) {
													int month = cal.get(Calendar.MONTH) + 1;
											%>

											<option value=<%out.print(i);%>>
												<%
													out.print(i);
												%>
											</option>
											<%
												}
											%>
										</select> <span class="input-group-addon">月</span>
									</div>
								</div>
							</div>
							<div class="col-xs-6 col-md-4">
								<input type="text" class="form-control input_search"
									name="productcode" placeholder="品名を入力してください。"
									style="height: 30px;">
							</div>
							<div class="col-xs-6 col-md-4">
								<button type="submit" class="btn btn-warning bt-search">検索</button>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
		<div class="table-responsive">
			<display:table id="txt" name="rtList" pagesize="15" requestURI=""
				class="table table-bordered">
				<display:column title="No.">${txt_rowNum}
				</display:column>
				<display:column property="feedcd" title="品名コード">
				</display:column>
				<display:column property="productName" title="品名"></display:column>
				<display:column property="supdate" title="出荷日"></display:column>
				<display:column property="formcd" title="容量"></display:column>
				<display:column property="weight" title="重量"></display:column>
				<display:column title="操作">
					<form action="booking.action" method="post" role="form"
						class="submit-form" enctype="multipart/form-data">
						<input id="code_${txt.feedcd}" type="hidden" name="productcode"
							value="${txt.feedcd}"> <input type="hidden"
							name="productname" value="${txt.productName}"> <input
							type="hidden" name="supdate" value="${txt.supdate}"> <input
							type="hidden" name="productcapacity" value="${txt.formcd}">
						<input type="hidden" name="formcd" value="${txt.formcd}">
						<input type="hidden" name="farmcd" value="${txt.farmcd}">
						<input type="hidden" name="prefcd" value="${txt.prefcd}">
						<input type="hidden" name="seqno" value="${txt.seqno}"> <input
							type="hidden" name="formname" value="${txt.formName}"> <input
							type="hidden" name="supdate" value="${txt.supdate}"> <input
							type="hidden" name="weight" value="${txt.weight}"> <input
							type="hidden" name="jichikucd" value="${txt.jichikucd}">
						<input type="hidden" name="productgetcd" value="${txt.getcd}">
						<input type="hidden" name="jichikuname" value="${txt.jichikuname}">
						<input type="hidden" name="actionType" value="HISTORY_REGISTER">
						<input type="submit" name="submit" value="新規登録"
							class="btn btn-default">
					</form>
				</display:column>
			</display:table>
		</div>
		<tiles:insertTemplate template="/template/footer.jsp"></tiles:insertTemplate>
	</div>
</body>
</html>